<?php include $this->getViewFile('/common/Head') ?>
<body class="J_scroll_fixed">

  <div class="wrap J_check_wrap">
    <?php include $this->getViewFile('/common/Nav') ?>




    <!-- 列表 -->
    <div class="mb10"> 共有 ( <b><?php echo $count; ?></b> ) 条记录</div>
    <form name="myform" action="" method="post" class="J_ajaxForm">
      <div class="table_list">
        <table width="100%" cellspacing="0">
          <thead>
            <tr>
              <td width="5%" align="center"><?php echo SpecialModel::model()->getAttributeLabel( 'id' ); ?></td>
              <td width="10%"align="center"><?php echo SpecialModel::model()->getAttributeLabel( 'name' ); ?></td>
              <td width="15%" align="center"><?php echo SpecialModel::model()->getAttributeLabel( 'url' ); ?></td>
              <td width="40%" align="center"><?php echo SpecialModel::model()->getAttributeLabel( 'remark' ); ?></td>
              <td align="center"><?php echo SpecialModel::model()->getAttributeLabel( 'add_time' ); ?></td>
              <td width="5%" align="center"><?php echo SpecialModel::model()->getAttributeLabel( 'listorder' ); ?></td>
              <td width="5%" align="center"><?php echo SpecialModel::model()->getAttributeLabel( 'status' ); ?></td>
              <td width="5%" align="center"><?php echo SpecialModel::model()->getAttributeLabel( 'is_special' ); ?></td>
              <td align="center">操作</td>
            </tr>
          </thead>
          <tbody>

             <?php foreach($models as $rs){ ?>
             <tr>
                <td width="50" align="center"><?php echo $rs->id; ?></td>
                <td align="center"><?php echo $rs->name?></td>
                <td align="center"><?php echo $rs->url?></td>
                <td><?php echo $rs->remark ?></td>
                <td align="center"><?php echo date('Y-m-d H:i', $rs->add_time)?></td>
                <td align="center"><?php echo $rs->listorder?></td>
                <td align="center"><?php echo SpecialModel::getStatusHtmlDetail($rs->status);?></td> 
                <td align="center"><?php echo SpecialModel::setIsSpecialHmtlDetail($rs->is_special);?></td>                      
                <td align="center">
                  <!-- <a class="J_ajax_del" href="">删除</a> -->

                <?php 
                  $op = array();
                  if(RBAC::authenticate('delete')){
                    $op[] = '<a class="J_ajax_del" href="'.$this->createUrl("delete", array("id" => $rs->id)).'">删除</a>';
                  }
                  if(RBAC::authenticate('edit')){
                    $op[] = '<a href="'.AdminBase::U("edit",array('id'=>$rs->id)).'" >编辑</a>';
                  }
                  $op = implode('|', $op);
                  echo $op;
                ?>
    

                </td>
          
              </tr>
             <?php } ?>

          </tbody>
        </table>

        <!-- 分页 -->
        <div class="p10">
          <div class="pages"><?php echo $pages;?></div>
        </div>
        
      </div>
    </form>


  </div>
  <script src="<?php echo $staticUrl; ?>statics/js/common.js"></script>
</body>
</html>